package s19.ch22.ex2;

import java.awt.BorderLayout;

import javax.swing.JButton;
import javax.swing.JFrame;

public class MyBorderLayout {

	public static void main(String[] args) {
		JFrame jFrame = new JFrame("My first swing app.");
		BorderLayout borderLayout = new BorderLayout(10, 10);
		jFrame.setLayout(borderLayout);
		jFrame.add(new JButton("OK"), BorderLayout.NORTH);
		jFrame.add(new JButton("Cancel"), BorderLayout.SOUTH);
		jFrame.add(new JButton("Abort"), BorderLayout.EAST);
		jFrame.add(new JButton("Apply"), BorderLayout.WEST);
		jFrame.add(new JButton("Confirm"), BorderLayout.CENTER);
		
		jFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		jFrame.setSize(400, 200);
		jFrame.setVisible(true);
	}
}
